package com.situ.mall.pattern.observer;

public class Reader implements Observer {
    private String name;
    public Reader(String name) {
        this.name = name;
    }
    @Override
    public void update(Subject subject) {
        NewsPaper newsPaper = (NewsPaper) subject;
        System.out.println(name + "收到报纸，内容为："+newsPaper.getContent());
    }
}
